<?php if($this->link!=''):?>
    <div class="fresh-button">
        <?php 
            /*echo CHtml::link(
            $this->link,'#', 
            array(
                'onClick'=>'js:$.getGoldPrice();return false;',
            ), 
            array('id' => 'gold-refresh'));*/ 
        ?>
        <?php 
        $script='
           $.getGoldPrice=function(){
                jQuery.ajax({
                    "url":"'.Yii::app()->createUrl('site/goldRate').'",
                    "beforeSend":function(){
                        $("#overlay").show();
                    },
                    "success":function(html){                    
                        $("#overlay").hide();
                        jQuery("#gold-widget div.portlet-content").html(html);
                    },
                });
                return false;
                };
        ';
        //cs()->registerScript('#get-gold',$script);
        //cs()->registerScript('refresh-30s', 'setInterval("$.getGoldPrice()",30000);', CClientScript::POS_END); 
        ?>
    </div>

    <?php endif;?>